package com.pcbly.web.business.workflow;

import java.util.List;

import com.pcbly.web.bean.workflow.WorkflowCategoryBean;
import com.pcbly.web.business.BaseServiceImp;
import com.pcbly.web.persistence.workflow.WorkflowCategoryDao;

public class WorkflowCategoryServiceImp extends
		BaseServiceImp<WorkflowCategoryBean> implements WorkflowCategoryService {
	private WorkflowCategoryDao workflowCategoryDao;

	public WorkflowCategoryServiceImp() {
		super();
	}

	public void setWorkflowCategoryDao(WorkflowCategoryDao workflowCategoryDao) {
		this.workflowCategoryDao = workflowCategoryDao;
	}

	@Override
	public void createWorkflowCategoryBean(WorkflowCategoryBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		workflowCategoryDao.createWorkflowCategoryBean(bean);
	}

	@Override
	public void deleteWorkflowCategoryBean(String id) throws Exception {
		// TODO Auto-generated method stub
		workflowCategoryDao.removeById(id);
	}

	@Override
	public WorkflowCategoryBean findByPrimeKey(String id) throws Exception {
		// TODO Auto-generated method stub
		return workflowCategoryDao.get(id);
	}

	@Override
	public List<WorkflowCategoryBean> getAllWorkflowCategoryBean()
			throws Exception {
		// TODO Auto-generated method stub
		return workflowCategoryDao.getAll(WorkflowCategoryBean.class);
	}

	@Override
	public void updateWorkflowCategoryBean(WorkflowCategoryBean bean)
			throws Exception {
		// TODO Auto-generated method stub
		workflowCategoryDao.saveObject(bean);
	} 
	
}
